import 'package:fluttertoast/fluttertoast.dart';
import 'package:leader_doctor_flutter/common/utils/string_utils.dart';

import '../http/http_client.dart';

/// @Author lixiaobin
/// @Date 2024/2/27
/// @Description
extension ServiceResultExtension on ServiceResult {
  /// toast 错误信息
  toastErrorMsg() {
    if (StringUtils.isNotEmpty(responseMsg) && !success) {
      Fluttertoast.showToast(msg: responseMsg ?? '');
    }
  }
}
